/***************************************************************************
                          ContinentView.hpp  -  description
                             -------------------
    begin                : October 29 2009
    copyright            : Copyright 2009, ACKERMANN Thibaut
    email                : tackerma@edu.univ-fcomte.fr
    website              : http://code.google.com/p/nover-project/
    license              : GNU GPL v3
 ***************************************************************************/
/* *************************************************************************
 *  This file is part of NOver-Project.
 *  
 *  NOver-Project is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *  
 *  NOver-Project is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *  
 *  You should have received a copy of the GNU General Public License
 *  along with NOver-Project.  If not, see <http://www.gnu.org/licenses/>.
 * *************************************************************************/


#ifndef _CONTINENTVIEW_
#define _CONTINENTVIEW_

#include <irrlicht.h>

#include <iostream>
#include <string>
#include <vector>
#include <tinyxml.h>

#include "GameView.hpp"
#include "StateMgr.hpp"
#include "Path.hpp"
#include "ids.hpp"
#include "DataMgr.hpp"
#include "Utils.hpp"
#include "Zoomable.hpp"

using namespace irr;

using core::rect;
using core::position2d;


/**
 * La classe ContinentView gère le rendu en mode "vue de continent"
 * @author Thibaut Ackermann
 */
class ContinentView : public GameView
{
public:
	
	ContinentView(std::string) throw (MyException);
	
	~ContinentView();
	
	void frame(float time);
	
	void resize(int width, int height);
	
	std::string matchCountry(int x, int y);
	
	std::string getCarteFilename()
	{
		return carte;
	}
	
	Zoomable* getZoomMap()
	{
		return zoomMap;
	}
	
private:
	
	// liste des pays se trouvant sur se continent
	// surtout pas de delete sur cette liste.
	std::vector< rect<s32> > rectpays;
	
	// Le continent correspondant
	Continent* continent;
	
	// infos sur ce continent
	// TODO : Redondant, à suppr
	std::string nom;
	std::string carte;
	
	// les widgets a afficher
	Zoomable* zoomMap;
	gui::IGUIComboBox* comboChoixContinent;
	gui::IGUIStaticText* textVueContinent;
	gui::IGUIStaticText* textChoixContinent;
	
	wchar_t** nomContinents;
	int continentCount;
	
	gui::IGUIEnvironment* gui;
	video::IVideoDriver* driver;
	
	// TODO : à voir si supprimable
	int winheight;
	int winwidth;
};

#endif

